package com.echat.business.work.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.echat.business.work.dao.WorkOffMapper;
import com.echat.business.work.model.WorkOff;
import com.echat.business.work.model.Worker;
import com.echat.business.work.service.IWorkOffService;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * <p>
 * 开发者开溜统计 服务实现类
 * </p>
 *
 * @author chentl123
 * @since 2019-06-17
 */
@Service
public class WorkOffServiceImpl extends ServiceImpl<WorkOffMapper, WorkOff> implements IWorkOffService {
    @Override
    public boolean insertWorkerData(Worker worker) {
        WorkOff workOff = new WorkOff();
        workOff.setWorkerId(worker.getId());
        workOff.setOffDate(new Date());
        workOff.setOffTime(new Date());
        workOff.setCreateby(1);
        return insert(workOff);
    }
}
